package com.JZ.QM.controller;

import com.JZ.QM.common.entity.CounselorInfoEntity;
import com.JZ.QM.common.utils.CommonResult;
import com.JZ.QM.feign.DataFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 *
 *
 * @author lyp
 * @email lyp@gmail.com
 * @date 2020-06-14 11:19:34
 */
@RefreshScope
@RestController
@Slf4j
@RequestMapping("/test")
public class testController {

    @Resource
    private DataFeignService dataFeignService;

    /*
     * openfeign调用data8021模块的服务
     */
    @RequestMapping("/test_openFeign")
    public CommonResult test_openFeign(){
        log.info("远程调用成功---");
        return dataFeignService.getData().put("message","远程调用成功!");
    }

}
